/*
 * @Descripttion:会员相关api
 */
import http from '@/utils/http'

// api接口列表
const api = {
  // 会员详情
  memberDetail: 'user/detail',
  // 搜索会员详情
  searchMemberDetail: 'user/search',
  // 新增会员
  memberAdd: 'user/add',
  // 积分修改
  pointsEdit: 'user/recharge',
  // 全部会员等级
  fetchMemberAll: 'user.grade/all',
  // 会员优惠券列表
  fetchCouponList: 'coupon/userCouponList',
  // 会员退卡
  memberDelete: 'user/delete',
  // 充值记录表
  fetchRechargeList: 'recharge.order/list',
  // 充值退款
  rechargeRevoke: 'user/revoke',
  // 退卡记录表
  fetchRefundCardList: 'user/deleteList',
  // 会员挂失
  memberUnhook: 'user/updateStatus',
  // 会员充值
  memberRecharge: 'user/retailRecharge',
  // 充值套餐列表
  rechargePlanList: 'recharge.plan/list',
  // 用户进入充值页，充值相关信息数据内容回显
  rechargeOrderPaymentInfo: 'user/orderPayment',
  // 调整充值金额 | 套餐
  rechargeOrderMoney: 'user/orderBindPlan',
  // 查询充值订单记录的详情小票
  rechargeOrderDetailTicket: 'recharge.order/ticket'
}
/**
 * @name: 会员详情
 * @return {*}
 */
export function memberDetail(data : any) {
  return http({
    url: api.memberDetail,
    method: 'post',
    data
  })
}
/**
 * @name: 搜索会员详情
 * @return {*}
 */
export function searchMemberDetail(data : any) {
  return http({
    url: api.searchMemberDetail,
    method: 'post',
    data
  })
}
/**
 * @name: 新增会员
 * @return {*}
 */
export function memberAdd(data : any) {
  return http({
    url: api.memberAdd,
    method: 'post',
    data
  })
}
/**
 * @name: 积分修改
 * @return {*}
 */
export function pointsEdit(data : any) {
  return http({
    url: api.pointsEdit,
    method: 'post',
    data
  })
}
/**
 * @name: 全部会员等级
 * @return {*}
 */
export function fetchMemberAll(data : any) {
  return http({
    url: api.fetchMemberAll,
    method: 'post',
    data
  })
}
/**
 * @name: 会员优惠券列表
 * @return {*}
 */
export function fetchCouponList(data : any) {
  return http({
    url: api.fetchCouponList,
    method: 'post',
    data
  })
}
/**
 * @name: 会员退卡
 * @return {*}
 */
export function memberDelete(data : any) {
  return http({
    url: api.memberDelete,
    method: 'post',
    data
  })
}

/**
 * @name: 充值记录表
 * @return {*}
 */
export function fetchRechargeList(data : any) {
  return http({
    url: api.fetchRechargeList,
    method: 'post',
    data
  })
}
/**
 * @name: 充值退款
 * @return {*}
 */
export function rechargeRevoke(data : any) {
  return http({
    url: api.rechargeRevoke,
    method: 'post',
    data
  })
}
/**
 * @name: 退卡记录表
 * @return {*}
 */
export function fetchRefundCardList(data : any) {
  return http({
    url: api.fetchRefundCardList,
    method: 'post',
    data
  })
}
/**
 * @name: 会员挂失
 * @return {*}
 */
export function memberUnhook(data : any) {
  return http({
    url: api.memberUnhook,
    method: 'post',
    data
  })
}
export function memberRecharge(data : any) {
  return http({
    url: api.memberRecharge,
    method: 'post',
    data
  })
}
export function rechargePlanList(data : any) {
  return http({
    url: api.rechargePlanList,
    method: 'post',
    data
  })
}
export function rechargeOrderPaymentInfo(data : any) {
  return http({
    url: api.rechargeOrderPaymentInfo,
    method: 'post',
    data
  })
}
export function rechargeOrderMoney(data : any) {
  return http({
    url: api.rechargeOrderMoney,
    method: 'post',
    data
  })
}
export function rechargeOrderDetailTicket(data : any) {
  return http({
    url: api.rechargeOrderDetailTicket,
    method: 'post',
    data
  })
}
